   String.prototype.fmt = function() {
        var formatted = this;
        for (var i=0;i<arguments.length;i++) {
            formatted = formatted.replace("{" + i + "}", ""+arguments[i]);
        }
        return formatted;
    };
